Setup

knitr::opts_chunk$set(echo = TRUE)

library(tidyverse)
library(R.utils)
library(wbCorr)
library(readxl)
library(kableExtra)
library(brms)
library(bayesplot)
library(beepr)


source(file.path('Functions', 'ReportModels.R'))
source(file.path('Functions', 'PrettyTables.R'))
source(file.path('Functions', 'ReportMeasures.R'))
source(file.path('Functions', 'PrepareData.R'))
system("shutdown /a")
## [1] 1116
# Set options for analysis
use_mi = FALSE
shutdown = FALSE
report_ordinal = FALSE

options(
  dplyr.print_max = 100, 
  brms.backend = 'cmdstan',
  brms.file_refit = ifelse(use_mi, 'never', 'on_change'),
  error = function() beepr::beep(sound = 5)
)
df <- openxlsx::read.xlsx(file.path('long.xlsx'))
df_original <- df

df_double <- prepare_data(df, use_mi = use_mi)[[1]]

Constructing scales Re-coding pusing reshaping data (4field) centering data within and between

Modelling

# For indistinguishable Dyads
model_rows_fixed <- c(
    'Intercept', 
    # '-- WITHIN PERSON MAIN EFFECTS --', 
    'persuasion_self_cw', 
    'persuasion_partner_cw', 
    'pressure_self_cw', 
    'pressure_partner_cw', 
    'pushing_self_cw', 
    'pushing_partner_cw', 
    'day', 
    'weartime_self_cw',
    
    'support_self_cw',
    'support_partner_cw',
    'isWeekendWeekend',
    'got_JITAI_selfJITAIreceived',
    'skilled_supportDaysafterIntervention',
    
    
    # '-- BETWEEN PERSON MAIN EFFECTS',
    'persuasion_self_cb',
    'persuasion_partner_cb',
    'pressure_self_cb',
    'pressure_partner_cb',
    'pushing_self_cb',
    'pushing_partner_cb',
    'weartime_self_cb',
    'studyGroupFirst3weeksinterventions',
    'studyGrouplast3weeksinterventions'
  )


model_rows_fixed_ordinal <- c(
  model_rows_fixed[1],
  'Intercept[1]',
  'Intercept[2]',
  'Intercept[3]',
  'Intercept[4]',
  'Intercept[5]',
  model_rows_fixed[2:length(model_rows_fixed)]
)

model_rows_random <- c(
  # '--------------',
  # '-- RANDOM EFFECTS --',
  'sd(Intercept)', 
  'sd(persuasion_self_cw)',
  'sd(persuasion_partner_cw)',
  'sd(pressure_self_cw)',
  'sd(pressure_partner_cw)',
  'sd(pushing_self_cw)',
  'sd(pushing_partner_cw)',
  # '-- CORRELATION STRUCTURE -- ', 
  'ar[1]', 
  'nu',
  'shape',
  'sderr',
  'sigma'
)

model_rows_random_ordinal <- c(model_rows_random,'disc')
# For indistinguishable Dyads
model_rownames_fixed <- c(
    'Intercept', 
    # '-- WITHIN PERSON MAIN EFFECTS --', 
    'Daily perceived persuasion target -> target', 
    'Daily perceived persuasion target -> agent', 
    'Daily perceived pressure target -> target', 
    'Daily perceived pressure target -> agent', 
    'Daily perceived pushing target -> target', 
    'Daily perceived pushing target -> agent', 
    'Day', 
    'Daily weartime',
    
    'Daily perceived support target -> target',
    'Daily perceived support target -> agent',
    'Is a weekend',
    'JITAI received',
    'Days post skilled support intervention',
    
    # '-- BETWEEN PERSON MAIN EFFECTS',
    'Mean perceived persuasion target -> target',
    'Mean Perceived persuasion target -> agent',
    'Mean Perceived pressure target -> target',
    'Mean Perceived pressure target -> agent',
    'Mean Perceived pushing target -> target',
    'Mean Perceived pushing target -> agent',
    'Mean weartime',
    
    'Difference study group 2',
    'Difference study group 3'
  )


model_rownames_fixed_ordinal <- c(
  model_rownames_fixed[1],
  'Intercept[1]',
  'Intercept[2]',
  'Intercept[3]',
  'Intercept[4]',
  'Intercept[5]',
  model_rownames_fixed[2:length(model_rownames_fixed)]
)

model_rownames_random <- c(
  # '--------------',
  # '-- RANDOM EFFECTS --',
  'sd(Intercept)', 
  'sd(Daily perceived persuasion target -> target)', 
  'sd(Daily perceived persuasion target -> agent)', 
  'sd(Daily perceived pressure target -> target)', 
  'sd(Daily perceived pressure target -> agent)', 
  'sd(Daily perceived pushing target -> target)', 
  'sd(Daily perceived pushing target -> agent)', 
  # '-- CORRELATION STRUCTURE -- ', 
  'ar[1]', 
  'nu',
  'shape',
  'sderr',
  'sigma'
)

model_rownames_random_ordinal <- c(model_rownames_random,'disc')
rows_to_pack <- list(
  "Within-Person Effects" = c(2,14),
  "Between-Person Effects" = c(15,23),
  "Random Effects" = c(24, 30), 
  "Additional Parameters" = c(31,35)
  )

rows_to_pack_ordinal <- list(
  "Intercepts" = c(1,6),
  "Within-Person Effects" = c(2+5,14+5),
  "Between-Person Effects" = c(15+5,23+5),
  "Random Effects" = c(24+5, 30+5), 
  "Additional Parameters" = c(31+5,35+6)
  )

Subjective MVPA

range(df_double$pa_sub, na.rm = T) 
## [1]   0 720
hist(df_double$pa_sub, breaks = 100) 

Modelling using the gaussian family fails. Due to the many zeros, transformations won’t help estimating the models. We employ the negative binomial family.

formula <- bf(
  pa_sub ~ 
    persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw +
    #barriers_self_cw +
    
    support_self_cw + support_partner_cw + 
    #comf_self_cw + reas_self_cw + 
    #isWeekend + 
    #got_JITAI_self + skilled_support +
    
    persuasion_self_cb + persuasion_partner_cb +
    pressure_self_cb + pressure_partner_cb +
    pushing_self_cb + pushing_partner_cb +
    
    
    #studyGroup +
    
    day + 
    
    # Random effects
    (persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw | coupleID),

  autocor = ~ ar(time = day, gr = coupleID:userID, p = 1)
)




prior1 <- c(
  brms::set_prior("normal(0, 2.5)", class = "b"),
  brms::set_prior("normal(0, 50)", class = "Intercept", lb = 0),
  
  brms::set_prior("normal(0, 10)", class = "sd", group = "coupleID", lb = 0),
  
  brms::set_prior("cauchy(0, 5)", class = "ar", lb = -1, ub = 1),
  brms::set_prior("cauchy(0, 20)", class = "shape"), 
  brms::set_prior("cauchy(0, 10)", class='sderr')
)

#df_minimal <- df_double[, c("userID", all.vars(as.formula(formula)))]

pa_sub <- my_brm(
  mi = use_mi, 
  imputed_data = implist,
  
  formula = formula, 
  prior = prior1,
  data = df_double, 
  family = brms::negbinomial(),
  #control = list(adapt_delta = 0.99),
  iter = 5000,
  warmup = 2000,
  chains = 4,
  cores = 4,
  seed = 7777,
  file = file.path("models_cache_brms", "OnlyExchangeProcesses_pa_sub")
)
pp_check(pa_sub, type='hist')
## Using 10 posterior draws for ppc type 'hist' by default.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

pp_check(pa_sub)
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

loo(pa_sub)
## 
## Computed from 12000 by 3732 log-likelihood matrix.
## 
##          Estimate    SE
## elpd_loo -12057.1 177.4
## p_loo        39.6   3.2
## looic     24114.2 354.9
## ------
## MCSE of elpd_loo is NA.
## MCSE and ESS estimates assume MCMC draws (r_eff in [0.3, 1.9]).
## 
## Pareto k diagnostic values:
##                          Count Pct.    Min. ESS
## (-Inf, 0.7]   (good)     3725  99.8%   589     
##    (0.7, 1]   (bad)         7   0.2%   <NA>    
##    (1, Inf)   (very bad)    0   0.0%   <NA>    
## See help('pareto-k-diagnostic') for details.
plot(pa_sub, ask = FALSE)

summarize_brms(
  pa_sub, 
  model_rows_fixed = model_rows_fixed,
  model_rows_random = model_rows_random,
  model_rownames_fixed = model_rownames_fixed,
  model_rownames_random = model_rownames_random,
  exponentiate = T) %>%
  print_df(rows_to_pack = rows_to_pack)
IRR l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 27.38* 19.52 38.26 1.001 1711.30 4230.49
Within-Person Effects
Daily perceived persuasion target -> target 1.02 0.91 1.15 1.001 14272.14 8565.24
Daily perceived persuasion target -> agent 0.99 0.88 1.12 1.000 13413.96 9381.52
Daily perceived pressure target -> target 1.21 0.92 1.65 1.000 15782.40 8738.71
Daily perceived pressure target -> agent 0.92 0.71 1.24 1.000 13578.47 8490.53
Daily perceived pushing target -> target 1.04 0.89 1.23 1.000 16100.20 9339.15
Daily perceived pushing target -> agent 0.95 0.80 1.14 1.000 15155.46 9629.66
Day 0.99 0.72 1.36 1.000 17705.41 9611.72
Daily weartime NA NA NA NA NA NA
Daily perceived support target -> target 0.92* 0.84 1.00 1.000 13080.24 9041.31
Daily perceived support target -> agent 0.98 0.91 1.07 1.001 15919.67 9566.21
Is a weekend NA NA NA NA NA NA
JITAI received NA NA NA NA NA NA
Days post skilled support intervention NA NA NA NA NA NA
Between-Person Effects
Mean perceived persuasion target -> target 1.14 0.68 1.96 1.000 6445.72 8022.62
Mean Perceived persuasion target -> agent 1.13 0.66 1.95 1.000 6684.21 8420.63
Mean Perceived pressure target -> target 1.47 0.74 2.91 1.001 8490.26 8605.69
Mean Perceived pressure target -> agent 0.70 0.33 1.49 1.000 7035.27 8742.84
Mean Perceived pushing target -> target 0.40* 0.16 0.99 1.000 6514.35 8431.52
Mean Perceived pushing target -> agent 0.60 0.27 1.34 1.000 8583.23 9146.36
Mean weartime NA NA NA NA NA NA
Difference study group 2 NA NA NA NA NA NA
Difference study group 3 NA NA NA NA NA NA
Random Effects
sd(Intercept) 0.67 0.50 0.91 1.00 3720.30 5873.42
sd(Daily perceived persuasion target -> target) 0.21 0.05 0.37 1.00 3078.10 1764.85
sd(Daily perceived persuasion target -> agent) 0.18 0.04 0.33 1.00 4382.31 3585.91
sd(Daily perceived pressure target -> target) 0.15 0.01 0.46 1.00 6855.19 4661.34
sd(Daily perceived pressure target -> agent) 0.14 0.01 0.42 1.00 7896.88 6105.09
sd(Daily perceived pushing target -> target) 0.26 0.02 0.54 1.00 3309.58 2989.19
sd(Daily perceived pushing target -> agent) 0.14 0.01 0.36 1.00 4884.44 4109.20
Additional Parameters
ar[1] 0.02 -0.94 0.94 1.00 12853.69 7222.50
nu NA NA NA NA NA NA
shape 0.14 0.13 0.14 1.00 15046.30 7609.60
sderr 0.05 0.00 0.13 1.00 7115.95 4932.03
sigma NA NA NA NA NA NA

Device Based MVPA

range(df_double$pa_obj, na.rm = T) 
## [1]   5.75 971.25
hist(df_double$pa_obj, breaks = 50)

df_double$pa_obj_log <- log(df_double$pa_obj)

hist(df_double$pa_obj_log, breaks = 50)

We tried negative binomial here as well for consistency, but the model did not converge. Poisson also did not work. As we have no zeros in this distribution, we log transform.

formula <- bf(
  pa_obj_log ~ 
    persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw +
    #barriers_self_cw +
    
    support_self_cw + support_partner_cw + 
    #comf_self_cw + reas_self_cw + 
    #isWeekend + 
    #got_JITAI_self + skilled_support +
    
    persuasion_self_cb + persuasion_partner_cb +
    pressure_self_cb + pressure_partner_cb +
    pushing_self_cb + pushing_partner_cb +
    
    
    #studyGroup +
    
    day + weartime_self_cw + weartime_self_cb +
    
    # Random effects
    (persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw | coupleID),

  autocor = ~ ar(time = day, gr = coupleID:userID, p = 1)
)



prior1 <- c(
  brms::set_prior("normal(0, 2.5)", class = "b"),
  brms::set_prior("normal(0, 50)", class = "Intercept", lb = 0),
  
  brms::set_prior("normal(0, 10)", class = "sd", group = "coupleID", lb = 0),
  
  brms::set_prior("cauchy(0, 5)", class = "ar", lb = -1, ub = 1),
  brms::set_prior("cauchy(0, 10)", class = "sigma", lb = 0)
)


#df_minimal <- df_double[, c("userID", all.vars(as.formula(formula)))]

pa_obj_log <- my_brm(
  mi = use_mi, 
  imputed_data = implist,
  
  formula = formula, 
  prior = prior1,
  data = df_double, 
  family = gaussian(),
  #control = list(adapt_delta = 0.99),
  iter = 5000,
  warmup = 2000,
  chains = 4,
  cores = 4,
  seed = 7777,
  file = file.path("models_cache_brms", "OnlyExchangeProcesses_pa_obj_log")
)
# plotting with the first imputed dataset. 
pp_check(pa_obj_log, type='hist')
## Using 10 posterior draws for ppc type 'hist' by default.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

pp_check(pa_obj_log)
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

loo(pa_obj_log)
## 
## Computed from 12000 by 3333 log-likelihood matrix.
## 
##          Estimate    SE
## elpd_loo  -2804.9  55.8
## p_loo       101.3   4.8
## looic      5609.9 111.5
## ------
## MCSE of elpd_loo is NA.
## MCSE and ESS estimates assume MCMC draws (r_eff in [0.5, 2.2]).
## 
## Pareto k diagnostic values:
##                          Count Pct.    Min. ESS
## (-Inf, 0.7]   (good)     3332  100.0%  984     
##    (0.7, 1]   (bad)         1    0.0%  <NA>    
##    (1, Inf)   (very bad)    0    0.0%  <NA>    
## See help('pareto-k-diagnostic') for details.
plot(pa_obj_log, ask = FALSE)

summarize_brms(
  pa_obj_log, 
  model_rows_fixed = model_rows_fixed,
  model_rows_random = model_rows_random,
  model_rownames_fixed = model_rownames_fixed,
  model_rownames_random = model_rownames_random,
  exponentiate = T) %>%
  print_df(rows_to_pack = rows_to_pack)
exp(Est.) l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 119.85* 108.13 132.71 1.001 3416.13 5255.06
Within-Person Effects
Daily perceived persuasion target -> target 0.99 0.97 1.02 1.000 25432.82 9228.89
Daily perceived persuasion target -> agent 1.02 1.00 1.04 1.000 26551.42 9417.08
Daily perceived pressure target -> target 0.99 0.94 1.05 1.000 27062.31 8433.42
Daily perceived pressure target -> agent 0.96 0.91 1.02 1.001 28306.82 8981.36
Daily perceived pushing target -> target 1.03 1.00 1.07 1.001 27709.11 9113.57
Daily perceived pushing target -> agent 0.98 0.95 1.02 1.002 25039.73 8530.28
Day 0.96 0.88 1.05 1.000 31008.01 9217.02
Daily weartime 1.00 1.00 1.00 1.000 12357.33 8036.03
Daily perceived support target -> target 0.99 0.97 1.00 1.000 27214.22 9614.43
Daily perceived support target -> agent 1.00 0.98 1.01 1.000 27625.40 9850.65
Is a weekend NA NA NA NA NA NA
JITAI received NA NA NA NA NA NA
Days post skilled support intervention NA NA NA NA NA NA
Between-Person Effects
Mean perceived persuasion target -> target 0.91 0.77 1.08 1.000 9118.87 9673.19
Mean Perceived persuasion target -> agent 1.08 0.91 1.29 1.000 9052.16 9873.71
Mean Perceived pressure target -> target 1.09 0.87 1.37 1.000 16223.78 9779.20
Mean Perceived pressure target -> agent 0.77* 0.62 0.95 1.000 13049.30 9630.39
Mean Perceived pushing target -> target 1.00 0.75 1.33 1.000 11582.48 10544.10
Mean Perceived pushing target -> agent 1.23 0.97 1.56 1.000 14361.43 10047.91
Mean weartime 1.00* 1.00 1.00 1.000 12690.08 10518.12
Difference study group 2 NA NA NA NA NA NA
Difference study group 3 NA NA NA NA NA NA
Random Effects
sd(Intercept) 0.26 0.20 0.34 1.00 4319.68 7420.54
sd(Daily perceived persuasion target -> target) 0.06 0.03 0.09 1.00 7504.09 7741.56
sd(Daily perceived persuasion target -> agent) 0.05 0.02 0.08 1.00 7057.98 6776.31
sd(Daily perceived pressure target -> target) 0.06 0.00 0.15 1.00 5662.74 6102.70
sd(Daily perceived pressure target -> agent) 0.04 0.00 0.10 1.00 8514.69 7503.79
sd(Daily perceived pushing target -> target) 0.08 0.01 0.15 1.00 3656.20 4503.71
sd(Daily perceived pushing target -> agent) 0.04 0.00 0.09 1.00 5568.26 6656.00
Additional Parameters
ar[1] 0.28 0.24 0.31 1.00 26308.69 8697.17
nu NA NA NA NA NA NA
shape NA NA NA NA NA NA
sderr NA NA NA NA NA NA
sigma 0.55 0.54 0.57 1.00 24456.41 9117.55

Affect

range(df_double$aff, na.rm = T) 
## [1] 1 6
hist(df_double$aff, breaks = 15)

formula <- bf(
  aff ~ 
    persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw +
    #barriers_self_cw +
    
    support_self_cw + support_partner_cw + 
    #comf_self_cw + reas_self_cw + 
    #isWeekend + 
    #got_JITAI_self + skilled_support +
    
    persuasion_self_cb + persuasion_partner_cb +
    pressure_self_cb + pressure_partner_cb +
    pushing_self_cb + pushing_partner_cb +
    
    
    #studyGroup +
    
    day +
    
    # Random effects
    (persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw | coupleID),

  autocor = ~ ar(time = day, gr = coupleID:userID, p = 1)
)



prior1 <- c(
  brms::set_prior("normal(0, 5)", class = "b"),
  brms::set_prior("normal(0, 20)", class = "Intercept", lb=0, ub=6), # range of the outcome scale
  
  brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0),

  brms::set_prior("cauchy(0, 5)", class = "ar", lb = -1, ub = 1),
  brms::set_prior("cauchy(0, 10)", class = "sigma", lb = 0)
  
)


df_minimal <- df_double[, c("userID", all.vars(as.formula(formula)))]

mood <- my_brm(
  mi = use_mi, 
  imputed_data = implist,
  
  formula = formula, 
  prior = prior1,
  data = df_double, 
  family = gaussian(),
  #control = list(adapt_delta = 0.95, max_treedepth = 15),
  iter = 5000,
  warmup = 2000,
  chains = 4,
  cores = 4,
  seed = 7777,
  file = file.path("models_cache_brms", "OnlyExchangeProcesses_mood")
)
pp_check(mood, type='hist')
## Using 10 posterior draws for ppc type 'hist' by default.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

pp_check(mood)
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

loo(mood)
## 
## Computed from 12000 by 3732 log-likelihood matrix.
## 
##          Estimate    SE
## elpd_loo  -4817.2  64.0
## p_loo        94.4   4.4
## looic      9634.5 128.0
## ------
## MCSE of elpd_loo is 0.1.
## MCSE and ESS estimates assume MCMC draws (r_eff in [0.4, 2.2]).
## 
## All Pareto k estimates are good (k < 0.7).
## See help('pareto-k-diagnostic') for details.
plot(mood, ask = FALSE)

summarize_brms(
  mood, 
  model_rows_fixed = model_rows_fixed,
  model_rows_random = model_rows_random,
  model_rownames_fixed = model_rownames_fixed,
  model_rownames_random = model_rownames_random,
  exponentiate = F) %>%
  print_df(rows_to_pack = rows_to_pack)
b l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 4.97* 4.74 5.19 1.002 1471.94 3583.71
Within-Person Effects
Daily perceived persuasion target -> target 0.02 -0.01 0.05 1.001 17431.94 9768.40
Daily perceived persuasion target -> agent -0.02 -0.05 0.01 1.000 18513.86 9277.02
Daily perceived pressure target -> target -0.02 -0.09 0.06 1.000 21992.73 9594.65
Daily perceived pressure target -> agent 0.04 -0.04 0.11 1.000 19754.66 8481.49
Daily perceived pushing target -> target -0.03 -0.08 0.01 1.000 19677.79 9253.05
Daily perceived pushing target -> agent -0.02 -0.07 0.03 1.000 21715.83 9719.64
Day -0.17* -0.32 -0.02 1.000 19672.38 9210.36
Daily weartime NA NA NA NA NA NA
Daily perceived support target -> target -0.01 -0.04 0.01 1.000 17086.28 9556.90
Daily perceived support target -> agent 0.00 -0.02 0.03 1.000 18181.40 9438.81
Is a weekend NA NA NA NA NA NA
JITAI received NA NA NA NA NA NA
Days post skilled support intervention NA NA NA NA NA NA
Between-Person Effects
Mean perceived persuasion target -> target 0.30 -0.02 0.60 1.000 5807.36 8209.14
Mean Perceived persuasion target -> agent 0.07 -0.24 0.38 1.001 5871.87 8606.58
Mean Perceived pressure target -> target 0.07 -0.28 0.43 1.000 8882.65 8640.74
Mean Perceived pressure target -> agent -0.20 -0.59 0.18 1.000 8550.53 8408.95
Mean Perceived pushing target -> target -0.50 -1.02 0.02 1.000 6979.46 8417.33
Mean Perceived pushing target -> agent -0.12 -0.56 0.32 1.000 7535.26 8954.33
Mean weartime NA NA NA NA NA NA
Difference study group 2 NA NA NA NA NA NA
Difference study group 3 NA NA NA NA NA NA
Random Effects
sd(Intercept) 0.63 0.49 0.82 1.00 2806.65 4903.58
sd(Daily perceived persuasion target -> target) 0.03 0.00 0.07 1.00 4566.95 5066.02
sd(Daily perceived persuasion target -> agent) 0.06 0.01 0.11 1.00 2845.82 3225.33
sd(Daily perceived pressure target -> target) 0.10 0.00 0.26 1.00 4074.71 5340.38
sd(Daily perceived pressure target -> agent) 0.14 0.01 0.31 1.00 3585.18 4429.76
sd(Daily perceived pushing target -> target) 0.09 0.02 0.16 1.00 4570.15 3175.93
sd(Daily perceived pushing target -> agent) 0.08 0.01 0.16 1.00 3736.19 3668.85
Additional Parameters
ar[1] 0.45 0.42 0.48 1.00 17155.46 8194.73
nu NA NA NA NA NA NA
shape NA NA NA NA NA NA
sderr NA NA NA NA NA NA
sigma 0.87 0.85 0.89 1.00 21105.96 8977.27

reactance

range(df_double$reactance, na.rm = T) 
## [1] 0 5
hist(df_double$reactance, breaks = 6)

formula <- bf(
  reactance ~ 
    persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw +
    #barriers_self_cw +
    
    support_self_cw + support_partner_cw + 
    #comf_self_cw + reas_self_cw + 
    #isWeekend + 
    #got_JITAI_self + skilled_support +
    
    persuasion_self_cb + persuasion_partner_cb +
    pressure_self_cb + pressure_partner_cb +
    pushing_self_cb + pushing_partner_cb +
    
    
    #studyGroup +
    
    day +
    
    # Random effects
    (persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw | coupleID),

  autocor = ~ ar(time = day, gr = coupleID:userID, p = 1)
)



prior1 <- c(
  brms::set_prior("normal(0, 5)", class = "b"),
  brms::set_prior("normal(0, 20)", class = "Intercept", lb=0, ub=5), # range of the outcome scale
  
  brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0),

  brms::set_prior("cauchy(0, 5)", class = "ar", lb = -1, ub = 1),
  brms::set_prior("cauchy(0, 10)", class = "sigma", lb = 0)
)


df_minimal <- df_double[, c("userID", all.vars(as.formula(formula)))]

reactance <- my_brm(
  mi = use_mi, 
  imputed_data = implist,
  
  formula = formula, 
  prior = prior1,
  data = df_double, 
  family = gaussian(),
  #control = list(adapt_delta = 0.95, max_treedepth = 15),
  iter = 5000,
  warmup = 2000,
  chains = 4,
  cores = 4,
  seed = 7777,
  file = file.path("models_cache_brms", "OnlyExchangeProcesses_reactance")

)
pp_check(reactance, type='hist')
## Using 10 posterior draws for ppc type 'hist' by default.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

pp_check(reactance)
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

loo(reactance)
## 
## Computed from 12000 by 755 log-likelihood matrix.
## 
##          Estimate   SE
## elpd_loo  -1076.6 33.8
## p_loo        87.5  8.2
## looic      2153.3 67.7
## ------
## MCSE of elpd_loo is NA.
## MCSE and ESS estimates assume MCMC draws (r_eff in [0.5, 1.7]).
## 
## Pareto k diagnostic values:
##                          Count Pct.    Min. ESS
## (-Inf, 0.7]   (good)     750   99.3%   241     
##    (0.7, 1]   (bad)        5    0.7%   <NA>    
##    (1, Inf)   (very bad)   0    0.0%   <NA>    
## See help('pareto-k-diagnostic') for details.
plot(reactance, ask = FALSE)

summary(reactance)
##  Family: gaussian 
##   Links: mu = identity; sigma = identity 
## Formula: reactance ~ persuasion_self_cw + persuasion_partner_cw + pressure_self_cw + pressure_partner_cw + pushing_self_cw + pushing_partner_cw + support_self_cw + support_partner_cw + persuasion_self_cb + persuasion_partner_cb + pressure_self_cb + pressure_partner_cb + pushing_self_cb + pushing_partner_cb + day + (persuasion_self_cw + persuasion_partner_cw + pressure_self_cw + pressure_partner_cw + pushing_self_cw + pushing_partner_cw | coupleID) 
##          autocor ~ ar(time = day, gr = coupleID:userID, p = 1)
##    Data: data (Number of observations: 755) 
##   Draws: 4 chains, each with iter = 5000; warmup = 2000; thin = 1;
##          total post-warmup draws = 12000
## 
## Correlation Structures:
##       Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## ar[1]     0.02      0.04    -0.07     0.10 1.00    14065     9237
## 
## Multilevel Hyperparameters:
## ~coupleID (Number of levels: 38) 
##                                                Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sd(Intercept)                                      0.58      0.09     0.44     0.77 1.00     5148     7274
## sd(persuasion_self_cw)                             0.06      0.04     0.00     0.15 1.00     2811     5678
## sd(persuasion_partner_cw)                          0.04      0.03     0.00     0.11 1.00     7210     6848
## sd(pressure_self_cw)                               0.44      0.10     0.28     0.67 1.00     7028     8441
## sd(pressure_partner_cw)                            0.20      0.15     0.01     0.56 1.00     3029     4612
## sd(pushing_self_cw)                                0.09      0.06     0.00     0.23 1.00     2866     5919
## sd(pushing_partner_cw)                             0.04      0.04     0.00     0.14 1.00     6079     6190
## cor(Intercept,persuasion_self_cw)                 -0.17      0.32    -0.71     0.49 1.00     9093     8326
## cor(Intercept,persuasion_partner_cw)               0.06      0.33    -0.60     0.68 1.00    18161     8385
## cor(persuasion_self_cw,persuasion_partner_cw)     -0.01      0.35    -0.67     0.67 1.00    13613     8710
## cor(Intercept,pressure_self_cw)                    0.28      0.20    -0.14     0.64 1.00     6028     7254
## cor(persuasion_self_cw,pressure_self_cw)          -0.15      0.32    -0.72     0.52 1.00     3268     5480
## cor(persuasion_partner_cw,pressure_self_cw)       -0.01      0.35    -0.68     0.65 1.00     3359     6406
## cor(Intercept,pressure_partner_cw)                 0.19      0.26    -0.34     0.69 1.00    10839     8512
## cor(persuasion_self_cw,pressure_partner_cw)        0.00      0.35    -0.66     0.66 1.00    10323     9323
## cor(persuasion_partner_cw,pressure_partner_cw)    -0.01      0.35    -0.67     0.66 1.00     8211     9977
## cor(pressure_self_cw,pressure_partner_cw)          0.01      0.32    -0.58     0.63 1.00    12178     9627
## cor(Intercept,pushing_self_cw)                    -0.03      0.26    -0.54     0.51 1.00    11981     8006
## cor(persuasion_self_cw,pushing_self_cw)           -0.01      0.35    -0.67     0.67 1.00     8848     9133
## cor(persuasion_partner_cw,pushing_self_cw)         0.03      0.36    -0.65     0.69 1.00     7577     9209
## cor(pressure_self_cw,pushing_self_cw)              0.07      0.33    -0.58     0.67 1.00    10824     9897
## cor(pressure_partner_cw,pushing_self_cw)           0.01      0.36    -0.67     0.69 1.00     7137     9451
## cor(Intercept,pushing_partner_cw)                  0.03      0.31    -0.58     0.62 1.00    17102     8663
## cor(persuasion_self_cw,pushing_partner_cw)         0.03      0.36    -0.66     0.69 1.00    16716     9054
## cor(persuasion_partner_cw,pushing_partner_cw)     -0.03      0.36    -0.70     0.65 1.00    11170     9044
## cor(pressure_self_cw,pushing_partner_cw)          -0.06      0.35    -0.69     0.63 1.00    16414    10009
## cor(pressure_partner_cw,pushing_partner_cw)        0.02      0.35    -0.65     0.68 1.00    11446    10471
## cor(pushing_self_cw,pushing_partner_cw)            0.02      0.36    -0.66     0.68 1.00    10347    10689
## 
## Regression Coefficients:
##                       Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## Intercept                 0.58      0.14     0.31     0.86 1.00     4416     7267
## persuasion_self_cw       -0.01      0.03    -0.06     0.05 1.00    14872     9265
## persuasion_partner_cw     0.01      0.03    -0.06     0.08 1.00    17770     8686
## pressure_self_cw         -0.02      0.05    -0.12     0.07 1.00    19041     8681
## pressure_partner_cw       0.08      0.07    -0.05     0.21 1.00    18500     8696
## pushing_self_cw          -0.03      0.03    -0.09     0.03 1.00    18575     9530
## pushing_partner_cw        0.00      0.04    -0.07     0.08 1.00    17614     8110
## support_self_cw           0.03      0.03    -0.02     0.09 1.00    16597     9471
## support_partner_cw       -0.02      0.03    -0.07     0.03 1.00    18824     9495
## persuasion_self_cb       -0.16      0.19    -0.54     0.21 1.00     9043     9157
## persuasion_partner_cb     0.11      0.20    -0.28     0.51 1.00     9807     8883
## pressure_self_cb          0.19      0.22    -0.23     0.62 1.00    10303     8759
## pressure_partner_cb      -0.09      0.24    -0.56     0.39 1.00     9848     8472
## pushing_self_cb          -0.12      0.30    -0.71     0.47 1.00     8616     8709
## pushing_partner_cb        0.01      0.30    -0.58     0.60 1.00    10767     9908
## day                      -0.12      0.14    -0.40     0.15 1.00    17591     9161
## 
## Further Distributional Parameters:
##       Estimate Est.Error l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
## sigma     0.94      0.03     0.89     1.00 1.00    11617     8123
## 
## Draws were sampled using sample(hmc). For each parameter, Bulk_ESS
## and Tail_ESS are effective sample size measures, and Rhat is the potential
## scale reduction factor on split chains (at convergence, Rhat = 1).
summarize_brms(
  reactance, 
  model_rows_fixed = model_rows_fixed,
  model_rows_random = model_rows_random,
  model_rownames_fixed = model_rownames_fixed,
  model_rownames_random = model_rownames_random,
  exponentiate = F) %>%
  print_df(rows_to_pack = rows_to_pack)
b l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 0.58* 0.31 0.86 1.001 4416.05 7266.63
Within-Person Effects
Daily perceived persuasion target -> target -0.01 -0.06 0.05 1.000 14872.27 9265.16
Daily perceived persuasion target -> agent 0.01 -0.06 0.08 1.001 17769.53 8685.61
Daily perceived pressure target -> target -0.02 -0.12 0.07 1.001 19041.06 8681.24
Daily perceived pressure target -> agent 0.08 -0.05 0.21 1.000 18500.41 8695.92
Daily perceived pushing target -> target -0.03 -0.09 0.03 1.001 18574.99 9529.66
Daily perceived pushing target -> agent 0.00 -0.07 0.08 1.000 17613.96 8109.67
Day -0.12 -0.40 0.15 1.001 17590.70 9161.24
Daily weartime NA NA NA NA NA NA
Daily perceived support target -> target 0.03 -0.02 0.09 1.000 16596.58 9471.28
Daily perceived support target -> agent -0.02 -0.07 0.03 1.000 18823.88 9494.52
Is a weekend NA NA NA NA NA NA
JITAI received NA NA NA NA NA NA
Days post skilled support intervention NA NA NA NA NA NA
Between-Person Effects
Mean perceived persuasion target -> target -0.16 -0.54 0.21 1.000 9042.60 9156.70
Mean Perceived persuasion target -> agent 0.11 -0.28 0.51 1.001 9806.57 8882.80
Mean Perceived pressure target -> target 0.19 -0.23 0.62 1.000 10302.94 8759.01
Mean Perceived pressure target -> agent -0.09 -0.56 0.39 1.000 9848.14 8472.11
Mean Perceived pushing target -> target -0.12 -0.71 0.47 1.000 8616.31 8709.12
Mean Perceived pushing target -> agent 0.01 -0.58 0.60 1.000 10767.39 9907.98
Mean weartime NA NA NA NA NA NA
Difference study group 2 NA NA NA NA NA NA
Difference study group 3 NA NA NA NA NA NA
Random Effects
sd(Intercept) 0.58 0.44 0.77 1.00 5147.90 7274.43
sd(Daily perceived persuasion target -> target) 0.06 0.00 0.15 1.00 2811.32 5678.00
sd(Daily perceived persuasion target -> agent) 0.04 0.00 0.11 1.00 7209.82 6848.02
sd(Daily perceived pressure target -> target) 0.44 0.28 0.67 1.00 7027.72 8440.53
sd(Daily perceived pressure target -> agent) 0.20 0.01 0.56 1.00 3029.40 4612.38
sd(Daily perceived pushing target -> target) 0.09 0.00 0.23 1.00 2865.83 5918.95
sd(Daily perceived pushing target -> agent) 0.04 0.00 0.14 1.00 6079.15 6189.51
Additional Parameters
ar[1] 0.02 -0.07 0.10 1.00 14064.57 9237.31
nu NA NA NA NA NA NA
shape NA NA NA NA NA NA
sderr NA NA NA NA NA NA
sigma 0.94 0.89 1.00 1.00 11617.13 8122.97

Binary Version

introduce_binary_reactance <- function(data) {
  data$is_reactance <- factor(data$reactance > 0, levels = c(FALSE, TRUE), labels = c(0, 1))
  return(data)
}



df_double <- introduce_binary_reactance(df_double)
if (use_mi) {
  for (i in seq_along(implist)) {
    implist[[i]] <- introduce_binary_reactance(implist[[i]])
  }
}


formula <- bf(
  is_reactance ~ 
    persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw +
    #barriers_self_cw +
    
    support_self_cw + support_partner_cw + support_partner_cw +
    #comf_self_cw + reas_self_cw + 
    #isWeekend + 
    #got_JITAI_self + skilled_support +
    
    persuasion_self_cb + persuasion_partner_cb +
    pressure_self_cb + pressure_partner_cb +
    pushing_self_cb + pushing_partner_cb +
    
    
    #studyGroup +
    
    day +
    
    # Random effects
    (persuasion_self_cw + persuasion_partner_cw +
    pressure_self_cw + pressure_partner_cw +
    pushing_self_cw + pushing_partner_cw | coupleID),

  autocor = ~ ar(time = day, gr = coupleID:userID, p = 1)
)



prior1 <- c(
  brms::set_prior("normal(0, 5)", class = "b"),
  brms::set_prior("normal(0, 20)", class = "Intercept", lb=0, ub=5), # range of the outcome scale
  
  brms::set_prior("normal(0, 2)", class = "sd", group = "coupleID", lb = 0),

  brms::set_prior("cauchy(0, 5)", class = "ar", lb = -1, ub = 1)
  #brms::set_prior("cauchy(0, 10)", class = "sigma", lb = 0)
)


df_minimal <- df_double[, c("userID", all.vars(as.formula(formula)))]

is_reactance <- my_brm(
  mi = use_mi, 
  imputed_data = implist,
  
  formula = formula, 
  prior = prior1,
  data = df_double, 
  family = bernoulli(),
  #control = list(adapt_delta = 0.95, max_treedepth = 15),
  iter = 5000,
  warmup = 2000,
  chains = 4,
  cores = 4,
  seed = 7777,
  file = file.path("models_cache_brms", "OnlyExchangeProcesses_is_reactance")
)
pp_check(is_reactance, type='hist')
## Using 10 posterior draws for ppc type 'hist' by default.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

pp_check(is_reactance)
## Using 10 posterior draws for ppc type 'dens_overlay' by default.

try(loo(is_reactance))
## 
## Computed from 12000 by 755 log-likelihood matrix.
## 
##          Estimate   SE
## elpd_loo   -455.2 17.0
## p_loo       402.0 15.6
## looic       910.3 34.0
## ------
## MCSE of elpd_loo is NA.
## MCSE and ESS estimates assume MCMC draws (r_eff in [0.7, 1.2]).
## 
## Pareto k diagnostic values:
##                          Count Pct.    Min. ESS
## (-Inf, 0.7]   (good)       5    0.7%   283     
##    (0.7, 1]   (bad)      270   35.8%   <NA>    
##    (1, Inf)   (very bad) 480   63.6%   <NA>    
## See help('pareto-k-diagnostic') for details.
plot(is_reactance, ask = FALSE)

summarize_brms(
  is_reactance, 
  model_rows_fixed = model_rows_fixed,
  model_rows_random = model_rows_random,
  model_rownames_fixed = model_rownames_fixed,
  model_rownames_random = model_rownames_random,
  exponentiate = T) %>%
  print_df(rows_to_pack = rows_to_pack)
OR l-95% CI u-95% CI Rhat Bulk_ESS Tail_ESS
Intercept 4.11 0.48 40.45 1.000 7309.93 8728.89
Within-Person Effects
Daily perceived persuasion target -> target 0.81 0.35 1.76 1.000 6606.04 7344.95
Daily perceived persuasion target -> agent 0.98 0.38 2.56 1.001 6331.98 7366.68
Daily perceived pressure target -> target 1.11 0.29 4.44 1.000 7719.88 7663.03
Daily perceived pressure target -> agent 2.94 0.54 19.58 1.000 6889.16 7479.12
Daily perceived pushing target -> target 0.48 0.17 1.14 1.000 5884.83 7110.07
Daily perceived pushing target -> agent 1.08 0.36 3.20 1.000 7032.88 7421.04
Day 0.27 0.01 10.36 1.000 7116.53 7095.53
Daily weartime NA NA NA NA NA NA
Daily perceived support target -> target 1.39 0.67 3.10 1.000 6585.70 6930.38
Daily perceived support target -> agent 0.73 0.32 1.58 1.000 6230.57 7536.40
Is a weekend NA NA NA NA NA NA
JITAI received NA NA NA NA NA NA
Days post skilled support intervention NA NA NA NA NA NA
Between-Person Effects
Mean perceived persuasion target -> target 0.21 0.00 17.52 1.000 6995.25 8054.91
Mean Perceived persuasion target -> agent 6.03 0.10 483.11 1.000 7662.85 8199.34
Mean Perceived pressure target -> target 3.77 0.03 442.52 1.000 6579.64 7354.94
Mean Perceived pressure target -> agent 0.61 0.00 79.53 1.001 7408.20 8334.77
Mean Perceived pushing target -> target 0.46 0.00 241.35 1.000 8868.82 8426.54
Mean Perceived pushing target -> agent 0.10 0.00 51.67 1.000 9031.14 9149.45
Mean weartime NA NA NA NA NA NA
Difference study group 2 NA NA NA NA NA NA
Difference study group 3 NA NA NA NA NA NA
Random Effects
sd(Intercept) 6.89 4.70 9.39 1.00 5275.48 6868.65
sd(Daily perceived persuasion target -> target) 1.42 0.21 2.91 1.00 2716.99 3001.26
sd(Daily perceived persuasion target -> agent) 1.34 0.11 3.01 1.00 2679.10 3721.90
sd(Daily perceived pressure target -> target) 3.45 1.56 5.73 1.00 4830.06 5540.42
sd(Daily perceived pressure target -> agent) 1.24 0.05 3.56 1.00 6159.98 6925.31
sd(Daily perceived pushing target -> target) 0.87 0.04 2.33 1.00 3104.86 5824.92
sd(Daily perceived pushing target -> agent) 0.83 0.03 2.40 1.00 5534.29 7125.71
Additional Parameters
ar[1] 0.12 -0.06 0.32 1.00 2272.37 4958.07
nu NA NA NA NA NA NA
shape NA NA NA NA NA NA
sderr 8.47 5.15 12.65 1.00 3171.28 5349.27
sigma NA NA NA NA NA NA

Report All Models

if (report_ordinal) {
  model_rows_random_final <- model_rows_random_ordinal
  model_rows_fixed_final <- model_rows_fixed_ordinal
  model_rownames_fixed_final <- model_rownames_fixed_ordinal
  model_rownames_random_final <- model_rownames_random_ordinal
  rows_to_pack_final <- rows_to_pack_ordinal
} else {
  model_rows_random_final <- model_rows_random
  model_rows_fixed_final <- model_rows_fixed
  model_rownames_fixed_final <- model_rownames_fixed
  model_rownames_random_final <- model_rownames_random
  rows_to_pack_final <- rows_to_pack
}



all_models <- report_side_by_side(
  pa_sub,
  pa_obj_log,
  mood,
  reactance,
  is_reactance,
  
  model_rows_random = model_rows_random_final,
  model_rows_fixed = model_rows_fixed_final,
  model_rownames_random = model_rownames_random_final,
  model_rownames_fixed = model_rownames_fixed_final
) 
## [1] "pa_sub"
## [1] "pa_obj_log"
## [1] "mood"
## [1] "reactance"
## [1] "is_reactance"
# pretty printing
summary_all_models <- all_models %>%
  print_df(rows_to_pack = rows_to_pack_final) %>%
  add_header_above(
    c(" ", "Subjective MVPA" = 2, 
      "Device-Based MVPA" = 2, 
      "Mood" = 2,
      "Reactance Gaussian" = 2, 
      "Reactance Dichotome" = 2)
  )

export_xlsx(summary_all_models, 
            rows_to_pack = rows_to_pack_final,
            file.path("Output", "SensitivityCovariates", 
            "OnlyExchangeProcesses_AllModels_SensCovariates.xlsx"),
            merge_option = 'both', 
            simplify_2nd_row = TRUE,
            colwidths = c(40, 7.4, 12.85, 7.4, 12.85,7.4, 12.85,7.4, 12.85,7.4, 12.85),
            line_above_rows = c(1,2,3,28),
            line_below_rows = c(-1))

summary_all_models
Subjective MVPA
Device-Based MVPA
Mood
Reactance Gaussian
Reactance Dichotome
IRR pa_sub 95% CI pa_sub exp(Est.) pa_obj_log 95% CI pa_obj_log b mood 95% CI mood b reactance 95% CI reactance OR is_reactance 95% CI is_reactance
Intercept 27.38* [19.52, 38.26] 119.85* [108.13, 132.71] 4.97* [ 4.74, 5.19] 0.58* [ 0.31, 0.86] 4.11 [0.48, 40.45]
Within-Person Effects
Daily perceived persuasion target -> target 1.02 [ 0.91, 1.15] 0.99 [ 0.97, 1.02] 0.02 [-0.01, 0.05] -0.01 [-0.06, 0.05] 0.81 [0.35, 1.76]
Daily perceived persuasion target -> agent 0.99 [ 0.88, 1.12] 1.02 [ 1.00, 1.04] -0.02 [-0.05, 0.01] 0.01 [-0.06, 0.08] 0.98 [0.38, 2.56]
Daily perceived pressure target -> target 1.21 [ 0.92, 1.65] 0.99 [ 0.94, 1.05] -0.02 [-0.09, 0.06] -0.02 [-0.12, 0.07] 1.11 [0.29, 4.44]
Daily perceived pressure target -> agent 0.92 [ 0.71, 1.24] 0.96 [ 0.91, 1.02] 0.04 [-0.04, 0.11] 0.08 [-0.05, 0.21] 2.94 [0.54, 19.58]
Daily perceived pushing target -> target 1.04 [ 0.89, 1.23] 1.03 [ 1.00, 1.07] -0.03 [-0.08, 0.01] -0.03 [-0.09, 0.03] 0.48 [0.17, 1.14]
Daily perceived pushing target -> agent 0.95 [ 0.80, 1.14] 0.98 [ 0.95, 1.02] -0.02 [-0.07, 0.03] 0.00 [-0.07, 0.08] 1.08 [0.36, 3.20]
Day 0.99 [ 0.72, 1.36] 0.96 [ 0.88, 1.05] -0.17* [-0.32, -0.02] -0.12 [-0.40, 0.15] 0.27 [0.01, 10.36]
Daily weartime NA NA 1.00 [ 1.00, 1.00] NA NA NA NA NA NA
Daily perceived support target -> target 0.92* [ 0.84, 1.00] 0.99 [ 0.97, 1.00] -0.01 [-0.04, 0.01] 0.03 [-0.02, 0.09] 1.39 [0.67, 3.10]
Daily perceived support target -> agent 0.98 [ 0.91, 1.07] 1.00 [ 0.98, 1.01] 0.00 [-0.02, 0.03] -0.02 [-0.07, 0.03] 0.73 [0.32, 1.58]
Is a weekend NA NA NA NA NA NA NA NA NA NA
JITAI received NA NA NA NA NA NA NA NA NA NA
Days post skilled support intervention NA NA NA NA NA NA NA NA NA NA
Between-Person Effects
Mean perceived persuasion target -> target 1.14 [ 0.68, 1.96] 0.91 [ 0.77, 1.08] 0.30 [-0.02, 0.60] -0.16 [-0.54, 0.21] 0.21 [0.00, 17.52]
Mean Perceived persuasion target -> agent 1.13 [ 0.66, 1.95] 1.08 [ 0.91, 1.29] 0.07 [-0.24, 0.38] 0.11 [-0.28, 0.51] 6.03 [0.10, 483.11]
Mean Perceived pressure target -> target 1.47 [ 0.74, 2.91] 1.09 [ 0.87, 1.37] 0.07 [-0.28, 0.43] 0.19 [-0.23, 0.62] 3.77 [0.03, 442.52]
Mean Perceived pressure target -> agent 0.70 [ 0.33, 1.49] 0.77* [ 0.62, 0.95] -0.20 [-0.59, 0.18] -0.09 [-0.56, 0.39] 0.61 [0.00, 79.53]
Mean Perceived pushing target -> target 0.40* [ 0.16, 0.99] 1.00 [ 0.75, 1.33] -0.50 [-1.02, 0.02] -0.12 [-0.71, 0.47] 0.46 [0.00, 241.35]
Mean Perceived pushing target -> agent 0.60 [ 0.27, 1.34] 1.23 [ 0.97, 1.56] -0.12 [-0.56, 0.32] 0.01 [-0.58, 0.60] 0.10 [0.00, 51.67]
Mean weartime NA NA 1.00* [ 1.00, 1.00] NA NA NA NA NA NA
Difference study group 2 NA NA NA NA NA NA NA NA NA NA
Difference study group 3 NA NA NA NA NA NA NA NA NA NA
Random Effects
sd(Intercept) 0.67 [ 0.50, 0.91] 0.26 [0.20, 0.34] 0.63 [0.49, 0.82] 0.58 [ 0.44, 0.77] 6.89 [ 4.70, 9.39]
sd(Daily perceived persuasion target -> target) 0.21 [ 0.05, 0.37] 0.06 [0.03, 0.09] 0.03 [0.00, 0.07] 0.06 [ 0.00, 0.15] 1.42 [ 0.21, 2.91]
sd(Daily perceived persuasion target -> agent) 0.18 [ 0.04, 0.33] 0.05 [0.02, 0.08] 0.06 [0.01, 0.11] 0.04 [ 0.00, 0.11] 1.34 [ 0.11, 3.01]
sd(Daily perceived pressure target -> target) 0.15 [ 0.01, 0.46] 0.06 [0.00, 0.15] 0.10 [0.00, 0.26] 0.44 [ 0.28, 0.67] 3.45 [ 1.56, 5.73]
sd(Daily perceived pressure target -> agent) 0.14 [ 0.01, 0.42] 0.04 [0.00, 0.10] 0.14 [0.01, 0.31] 0.20 [ 0.01, 0.56] 1.24 [ 0.05, 3.56]
sd(Daily perceived pushing target -> target) 0.26 [ 0.02, 0.54] 0.08 [0.01, 0.15] 0.09 [0.02, 0.16] 0.09 [ 0.00, 0.23] 0.87 [ 0.04, 2.33]
sd(Daily perceived pushing target -> agent) 0.14 [ 0.01, 0.36] 0.04 [0.00, 0.09] 0.08 [0.01, 0.16] 0.04 [ 0.00, 0.14] 0.83 [ 0.03, 2.40]
Additional Parameters
ar[1] 0.02 [-0.94, 0.94] 0.28 [0.24, 0.31] 0.45 [0.42, 0.48] 0.02 [-0.07, 0.10] 0.12 [-0.06, 0.32]
nu NA NA NA NA NA NA NA NA NA NA
shape 0.14 [ 0.13, 0.14] NA NA NA NA NA NA NA NA
sderr 0.05 [ 0.00, 0.13] NA NA NA NA NA NA 8.47 [ 5.15, 12.65]
sigma NA NA 0.55 [0.54, 0.57] 0.87 [0.85, 0.89] 0.94 [ 0.89, 1.00] NA NA
report::report_system()

Analyses were conducted using the R Statistical language (version 4.4.1; R Core Team, 2024) on Windows 11 x64 (build 22635)

report::cite_packages()